ALMaSS  1.0
The Animal, Landscape and Man Simulation System
PollenNectarDevelopmentCurve Class Reference

A standard class to contain a pollen or nectar curve based on indexed rates. More...

#include <plants.h>

Public Member Functions

 PollenNectarDevelopmentCurve (vector< int > *a_index, vector< double > *a_slopes)
 
 ~PollenNectarDevelopmentCurve ()
 
double GetData (int a_index)
 The basic return function for the curve - day indexed. More...
 
int closest (int a_value)
 

Protected Attributes

int m_CurveRefNum
 a reference to identify this precise curve - needs external management More...
 
vector< double > m_data
 The slopes used. More...
 
vector< int > m_index
 the index values to the slopes More...
 

Detailed Description

A standard class to contain a pollen or nectar curve based on indexed rates.

Constructor & Destructor Documentation

◆ PollenNectarDevelopmentCurve()

PollenNectarDevelopmentCurve::PollenNectarDevelopmentCurve ( vector< int > *  a_index,
vector< double > *  a_slopes 
)
inline
186  {
187  m_index = *a_index;
188  m_data = *a_slopes;
189  }
vector< int > m_index
the index values to the slopes
Definition: plants.h:206
vector< double > m_data
The slopes used.
Definition: plants.h:204

◆ ~PollenNectarDevelopmentCurve()

PollenNectarDevelopmentCurve::~PollenNectarDevelopmentCurve ( )
inline
190 { ; }

Member Function Documentation

◆ closest()

int PollenNectarDevelopmentCurve::closest ( int  a_value)
inline
196  {
197  // returns the vector index for m_index where the value contained is the first number greater than a_value
198  return int(std::distance(m_index.begin(), upper_bound(m_index.begin(), m_index.end(), a_value)));
199  }

◆ GetData()

double PollenNectarDevelopmentCurve::GetData ( int  a_index)
inline

The basic return function for the curve - day indexed.

193  {
194  return m_data[a_index];
195  }

Referenced by VegElement::PollenNectarPhenologyCalculation().

Member Data Documentation

◆ m_CurveRefNum

int PollenNectarDevelopmentCurve::m_CurveRefNum
protected

a reference to identify this precise curve - needs external management

◆ m_data

vector<double> PollenNectarDevelopmentCurve::m_data
protected

The slopes used.

◆ m_index

vector<int> PollenNectarDevelopmentCurve::m_index
protected

the index values to the slopes


The documentation for this class was generated from the following file: